from django.contrib.auth.models import Permission
from rest_framework.mixins import ListModelMixin
from rest_framework.viewsets import GenericViewSet

from apps.UserControl.models import Permissions
from apps.UserControl.serializrs.permission import *
from django_filters.rest_framework import DjangoFilterBackend
from rest_framework.filters import OrderingFilter
from utils.viewsets import ModelViewSet
from apps.UserControl.filters.permission import PermissionFilters


class PermissionViewSet(ModelViewSet):
    filter_class = PermissionFilters
    queryset = Permissions.objects.all().order_by('id')
    serializer_class = PermissionSerializers
    pagination_class = None
